<script>
  const arr = [1, 2, 3, 1, 1, 6]
  for (let i = 0; i < arr.length; i++) {
    for (let j = i + 1; j < arr.length; j++) {
      if (arr[i] === arr[j]) {
        // [1, 2, 3, 1, 6]
        arr.splice(j, 1)
        j--
      }
    }
  }
  console.log(arr)
</script>
